import rxAjax from '@/assets/js/ajax.js';

//form_bo_list_history api接口
export const ListHistoryApi = {};

ListHistoryApi.baseUrl= '/api-form/form/core/listHistory';
ListHistoryApi.exportUrl= ListHistoryApi.baseUrl + '/listExport';

//查询列表
ListHistoryApi.query=function (parameter) {
  var url= ListHistoryApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
ListHistoryApi.get =function(pkId) {
  var url= ListHistoryApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
ListHistoryApi.save =function(parameter) {
  var url= ListHistoryApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
ListHistoryApi.del =function(parameter) {
  var url= ListHistoryApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

export  default ListHistoryApi;

